package highlight_spring4.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

//利用@Controller注解声明是一个控制器
@Controller
public class HelloController {
    //利用@RequestMapping配置URL和方法之间的映射
    @RequestMapping("index")
    public  String hello(){
        //通过上面的ViewResolver的Bean配置，返回值为index，说明我们的页面放置的路径为WEB-INFclasses/views/index.jsp
        return "index";
    }
}
